<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<title>Smuoi Application Inline Frame</title>
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">
	<script type="text/javascript" src="<?=SHR.'/smrnl/'.SMERNEL.'/js/smototype.js'?>"></script>
	<script type="text/javascript" src="<?=SHR.'/smrnl/'.SMERNEL.'/js/scriptaculous.js?load=effects,swfobject'?>"></script>
	<script type="text/javascript">
		
		var win,doc;
		
		window.onload = function(){
			frameElement.window = window;
			win = window.parent;
			doc = win.document;
			newswf(1);
			$('info').appear({delay:0.5});
		}
		
		function pubkey(){
			return $C('pubkey').value;
		}
		
		function newswf(f){
			var d = document.createElement('div');
			d.id = new Date().getTime();
			d.style.display = 'none';
			$('swfs').appendChild(d);	
			var so = new SWFObject("<?=$this->file_uri('upfmgr03f82.swf', '/swf')?>", d.id+'swf', 580, 50, 8, '#FFFFFF');
			so.addParam("flashvars", 'token=' + pubkey() + '&par_id=<?=$_GET['fmrp']?>');
			so.write(d.id);
			d.appear();
			if(!f && ($('note').style.display == 'none')) $('note').appear({delay:0.5});
		}
		
	</script>
	<style type="text/css">
		body{
			width:580px; 
			margin:0; 
			padding:5px 0 0 0;
			font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
			text-align:left;
		}
		#plus{
			background-image:url('<?=Screen()->icon('add.png', 32)?>'); 
			height:32px; 
			width:32px; 
			margin:0 10px; 
			float:left;
			opacity:0.8;
			cursor:pointer
		}
		#plus:hover{
			opacity:1	
		}
		small{
			font-size:0.6em;
			color:#999;
			float:right
		}
	</style>
</head>
<body id="body">
<div id="swfs">
</div>
<div id="info" style="display:none">
<div style="padding:5px"><div id="plus" onclick="newswf()"></div> <a href="javascript:newswf()">Add another upload</a></div></div>
<br />
<small id="note" style="display:none">To upload a large quantity of files you can always zip/gzip them and unpack them once they're uploaded</small>

</body>
</html>